package csmzxy;public class class2334 {import java.time.LocalDate;

    public class example11 {

        public static void main(String[] args) {
            LocalDate now = LocalDate.now();
            System.out.println(now);

            LocalDate of = LocalDate.of(2023, 11, 20);
            System.out.println(of);

            System.out.println(now.getYear());

            String dateStr = "2023-11-17";
            System.out.println("把日期字符串解析成日期对象的结果为：" + LocalDate.parse(dateStr));
            System.out.println(now.plusYears(1));
            System.out.println(now.plusDays(10));
            System.out.println(now.minusDays(10));
        }
    }
}
